listbox: Avoid a warning
authorMatthias Clasen <mclasen@redhat.com>
Sun, 13 Jul 2014 19:51:03 +0000 (15:51 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 13 Jul 2014 19:51:03 +0000 (15:51 -0400)
Don't try to set an adjustment value if we don't have an adjustment.

gtk/gtklistbox.c

index d3afac46b5d355f01545dcac5dba63561b74b4bc..d13b78770eafcca27275c654036cf40b1992adef 100644 (file)
@@ -1335,6 +1335,9 @@ ensure_row_visible (GtkListBox    *box,
   GtkWidget *widget;
   GtkAllocation allocation;
 
+  if (!priv->adjustment)
+    return;
+
   /* If the row has a header, we want to ensure that it is visible as well. */
   header = ROW_PRIV (row)->header;
   if (GTK_IS_WIDGET (header) && gtk_widget_is_drawable (header))